#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

int main(int argc, char **argv, char **envp) {
	if (argc != 2) return 1;

	struct stat *stat;
	char *file = argv[1];

	lstat(file, stat);

	// Prints everything from the struct stat, with
	// all values in hex.
	printf("containingdevice: %x\n", stat->st_dev);
	printf("inode: %x\n", stat->st_ino);
	printf("mode: %x\n", stat->st_mode);
	printf("hardlinks: %x\n", stat->st_nlink);
	printf("uid: %x\n", stat->st_uid);
	printf("gid: %x\n", stat->st_gid);
	printf("dev: %x\n", stat->st_rdev);
	printf("size: %x\n", stat->st_size);
	printf("blocksize: %x\n", stat->st_blksize);
	printf("blocknum: %x\n", stat->st_blocks);
	printf("atime: %x\n", stat->st_atime);
	printf("mtime: %x\n", stat->st_mtime);
	printf("ctime: %x\n", stat->st_ctime);
	
	return 0;
}
